/**
 * @class kiva.views.LoanInfo
 * @extends Ext.Sheet
 *
 * We use this Ext.Sheet subclass to display information about a particular Loan when the user has tapped on it.
 * Ext.Sheet is an overlay class that slides in from above, below or one of the sides, usually in response to a
 * user action such as tapping on a list item.
 *
 * In this class we set the sheet up to be modal (masks the rest of the page) and to enter and exit from the
 * right hand edge of the screen. It hides itself when the user taps on the modal mask (via the hideOnMaskTap config).
 *
 * Inside the class we have an Ext.Carousel with three cards - details, payments and map. Each card is set up
 * inside its own function to make it easy to see what is going on. The LoanInfo sheet is rendered and shown by
 * the loan controller's 'show' action (see app/controllers/loans.js).
 *
 */
Ext.define('DDMS.view.Unit', {
    extend: 'Ext.Container',
    
    id: 'unit',
    requires: [
        'Ext.dataview.NestedList'
    ],
    config: {
        modal: true,
        centered : false,
        hideOnMaskTap : true,
        top: '25%',
        right: '20%',
        bottom: '20%',
        left: '20%',
        
        layout: {
            type: 'card',
            animation: {
                type: 'slide',
                direction: 'left',
                duration: 250
            }
        },

        items: [
            {
            	id:'unit-nestedlist',
            	name:'unit-nestedlist',
            	xtype : 'nestedlist',
            	useTitleAsBackText:false, 
			    backText:'返回',
			    displayField: 'text',
			    store: 'Unit'
            }
        ]
    }
});
